package com.app;


public abstract class Task implements Runnable{
	private boolean stop;
	public void stop(){
		stop = true;
	}
	@Override
	public void run() {
		stop = false;
		while(!stop){
			task();
		}
	}
	protected abstract void task();
}
